package com.example.springbootmvc.controller;

import org.springframework.web.bind.annotation.*;

@RequestMapping("/test")
@RestController
public class TestController {


    @RequestMapping(path = "/sayhi",method = RequestMethod.POST)
    public String sayhi() {
        return "你好 SpringMVC";
    }

    @GetMapping("/sayhi2")
    public String sayhi2() {
        return "你好,spring Mvc 2";
    }

    @PostMapping("/sayhi3")
    public String sayhi3() {
        return "你好,sayHi3";
    }
}
